from rest_framework import serializers
from yaasapp.models import AuctionData

class AuctionSerializer(serializers.ModelSerializer):
    class Meta:
        model = AuctionData
        fields = ('title', 'category', 'cPrice', 'iDesc', 'sDate', 'eDate', 'aOwner','bider')
        read_only_fields = ('title', 'category','aOwner','sDate', 'eDate',)

class AuctionAddSerializer(serializers.ModelSerializer):
    class Meta:
        model = AuctionData
        fields = ('title', 'category', 'cPrice', 'iDesc', 'sDate', 'eDate', 'aOwner','status', 'bider')
        # read_only_fields = ('title', 'category','aOwner','sDate', 'eDate',)